<?xml version='1.0' encoding='UTF-8' ?>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:rich="http://richfaces.org/rich"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:a4j="http://richfaces.org/a4j">
    <body>
        <ui:composition template="/common/templates/common.xhtml">
            <ui:param name="titulo" value="Control de Acceso" />
            <ui:define name="body">
                <rich:panel>
                    <form  action="j_security_check" method="POST">
                        <div align="right">
                            <a4j:commandLink value="ver Catalogo de Productos" action="#{MenuBean.compras}" />
                        </div>
                        <div align="left">
                            <a4j:commandLink value="registrarse" action="#{MenuBean.registrarse}" />
                        </div>
                        <rich:messages passedLabel="Data is allowed to be stored." layout="list">
                            <f:facet name="header">
                                <h:outputText value="Entered Data Status:"></h:outputText>
                            </f:facet>
                            <f:facet name="infoMarker">
                                <h:graphicImage  value="/img/passed_.gif" />
                            </f:facet>
                            <f:facet name="errorMarker">
                                <h:graphicImage value="/img/error_.gif" />
                            </f:facet>
                        </rich:messages>
                       <h:panelGrid >
                            <h:graphicImage  value="/img/password.png"/>
                            <h:outputLabel id="mensaje" value="Error ingresando al sistema"/>
                            <h:outputLabel value="Nombre Usuario" />
                            <h:input type="text" name = "j_username" />
                            <h:outputLabel value="Contraseña" />
                            <h:input type="password" name="j_password" />
                        </h:panelGrid>
                        <h:panelGrid columns="2">
                            <input type="submit" value="Ingresar"/>
                            <h:commandButton value="Salir" />
                        </h:panelGrid>
                    </form>
                </rich:panel>
            </ui:define>
        </ui:composition>
    </body>
</html>